from django.urls import path
from .views import *

urlpatterns = [
    # 任务相关接口地址
    path(
        "taskInfo/", TaskInfoView.as_view({"get": "page", "post": "add", })
    ),
    path("taskInfo/run/<int:pk>/", TaskInfoView.as_view({"post": "run", })),
    path("taskInfo/update/", TaskInfoView.as_view({"post": "update", })),
    path("taskInfo/detail/<int:pk>/", TaskInfoView.as_view({"get": "details", })),
    path("taskInfo/resume/<int:pk>/", TaskInfoView.as_view({"post": "resume", })),
    path("taskInfo/pause/<int:pk>/", TaskInfoView.as_view({"post": "pause", })),
    path("taskInfo/delete/<int:pk>/", TaskInfoView.as_view({"delete": "delete", })),
    # 任务日志相关地址
    path("taskLog/", TaskLogView.as_view({"get": "page"})),
    path("taskLog/detail/<int:pk>/", TaskLogDetailsView.as_view({"get": "details", }))

]
